package com.tanhua.dubbo.api.mongo;

import com.tanhua.domain.mongo.Publish;
import com.tanhua.domain.vo.PageResult;

import java.util.List;

public interface PublishApi {

    //发布朋友圈
    void save(Publish publish);

    //查询好友的朋友圈
    PageResult findByTimeLine(Integer page, Integer pageSize, long userId);

    //查询推荐圈子
    PageResult queryRecommendPublishList(Integer page, Integer pageSize, long userId);

    //根据id查找publish
    Publish findById(String publishId);



    /**
     * 查询某用户的动态
     * @param page
     * @param pagesize
     * @param userId
     * @return
     */
    PageResult queryMyPublishList(Integer page, Integer pagesize, Long userId);

    //更新朋友圈的状态
    void update(String publishId, Integer state);

    //根据pid查询动态
    List<Publish> findByPid(List<Long> pidList);

    //查询用户的朋友圈
    PageResult queryPublishList(Integer page, Integer pagesize, Long uid, String state);
}
